home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / commandhandler / nsIControllerContext.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  124 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIControllerContext.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIControllerContext_h__
  6. #define __gen_nsIControllerContext_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsIControllerCommandTable_h__
  14. #include "nsIControllerCommandTable.h"
  15. #endif
  16.  
  17. /* For IDL files that don't want to include root IDL files. */
  18. #ifndef NS_NO_VTABLE
  19. #define NS_NO_VTABLE
  20. #endif
  21.  
  22. /* starting interface:    nsIControllerContext */
  23. #define NS_ICONTROLLERCONTEXT_IID_STR "47b82b60-a36f-4167-8072-6f421151ed50"
  24.  
  25. #define NS_ICONTROLLERCONTEXT_IID \
  26.   {0x47b82b60, 0xa36f, 0x4167, \
  27.     { 0x80, 0x72, 0x6f, 0x42, 0x11, 0x51, 0xed, 0x50 }}
  28.  
  29. class NS_NO_VTABLE nsIControllerContext : public nsISupports {
  30.  public: 
  31.  
  32.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICONTROLLERCONTEXT_IID)
  33.  
  34.   /**
  35.    *  Init the controller, optionally passing a controller
  36.    *  command table.
  37.    *
  38.    * @param aCommandTable  a command table, used internally
  39.    *                       by this controller. May be null, in
  40.    *                       which case the controller will create
  41.    *                       a new, empty table.
  42.    */
  43.   /* void init (in nsIControllerCommandTable aCommandTable); */
  44.   NS_IMETHOD Init(nsIControllerCommandTable *aCommandTable) = 0;
  45.  
  46.   /** 
  47.    *  Set a context on this controller, which is passed
  48.    *  to commands to give them some context when they execute.
  49.    *
  50.    * @param aCommandContext  the context passed to commands.
  51.    *                        Note that this is *not* addreffed by the
  52.    *                        controller, and so needs to outlive it,
  53.    *                        or be nulled out.
  54.    */
  55.   /* void setCommandContext (in nsISupports aCommandContext); */
  56.   NS_IMETHOD SetCommandContext(nsISupports *aCommandContext) = 0;
  57.  
  58. };
  59.  
  60. /* Use this macro when declaring classes that implement this interface. */
  61. #define NS_DECL_NSICONTROLLERCONTEXT \
  62.   NS_IMETHOD Init(nsIControllerCommandTable *aCommandTable); \
  63.   NS_IMETHOD SetCommandContext(nsISupports *aCommandContext); 
  64.  
  65. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  66. #define NS_FORWARD_NSICONTROLLERCONTEXT(_to) \
  67.   NS_IMETHOD Init(nsIControllerCommandTable *aCommandTable) { return _to Init(aCommandTable); } \
  68.   NS_IMETHOD SetCommandContext(nsISupports *aCommandContext) { return _to SetCommandContext(aCommandContext); } 
  69.  
  70. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  71. #define NS_FORWARD_SAFE_NSICONTROLLERCONTEXT(_to) \
  72.   NS_IMETHOD Init(nsIControllerCommandTable *aCommandTable) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aCommandTable); } \
  73.   NS_IMETHOD SetCommandContext(nsISupports *aCommandContext) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCommandContext(aCommandContext); } 
  74.  
  75. #if 0
  76. /* Use the code below as a template for the implementation class for this interface. */
  77.  
  78. /* Header file */
  79. class nsControllerContext : public nsIControllerContext
  80. {
  81. public:
  82.   NS_DECL_ISUPPORTS
  83.   NS_DECL_NSICONTROLLERCONTEXT
  84.  
  85.   nsControllerContext();
  86.  
  87. private:
  88.   ~nsControllerContext();
  89.  
  90. protected:
  91.   /* additional members */
  92. };
  93.  
  94. /* Implementation file */
  95. NS_IMPL_ISUPPORTS1(nsControllerContext, nsIControllerContext)
  96.  
  97. nsControllerContext::nsControllerContext()
  98. {
  99.   /* member initializers and constructor code */
  100. }
  101.  
  102. nsControllerContext::~nsControllerContext()
  103. {
  104.   /* destructor code */
  105. }
  106.  
  107. /* void init (in nsIControllerCommandTable aCommandTable); */
  108. NS_IMETHODIMP nsControllerContext::Init(nsIControllerCommandTable *aCommandTable)
  109. {
  110.     return NS_ERROR_NOT_IMPLEMENTED;
  111. }
  112.  
  113. /* void setCommandContext (in nsISupports aCommandContext); */
  114. NS_IMETHODIMP nsControllerContext::SetCommandContext(nsISupports *aCommandContext)
  115. {
  116.     return NS_ERROR_NOT_IMPLEMENTED;
  117. }
  118.  
  119. /* End of implementation class template. */
  120. #endif
  121.  
  122.  
  123. #endif /* __gen_nsIControllerContext_h__ */
  124.